package com.synergy.stockflow.production.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "inbound_order_detail")
public class InboundOrderDetail {
    /**
     * 入库明细ID
     */
    @TableId(value = "detail_id", type = IdType.ASSIGN_ID)
    @Schema(description="入库明细ID")
    private String detailId;

    /**
     * 入库ID
     */
    @TableField(value = "inbound_id")
    @Schema(description="入库ID")
    private String inboundId;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    @Schema(description="产品ID")
    private String productId;

    /**
     * 计划ID
     */
    @TableField(value = "plan_id")
    @Schema(description="计划ID")
    private String planId;

    /**
     * 任务ID
     */
    @TableField(value = "task_id")
    @Schema(description="任务ID")
    private String taskId;

    /**
     * 批次号
     */
    @TableField(value = "batch_no")
    @Schema(description="批次号")
    private String batchNo;

    /**
     * 计划入库数量
     */
    @TableField(value = "inbound_quantity")
    @Schema(description="计划入库数量")
    private BigDecimal inboundQuantity;

    /**
     * 实际入库数量
     */
    @TableField(value = "actual_quantity")
    @Schema(description="实际入库数量")
    private BigDecimal actualQuantity;

    /**
     * 质检员ID
     */
    @TableField(value = "check_id")
    @Schema(description="质检员ID")
    private String checkId;

    /**
     * 质检时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "check_time")
    @Schema(description="质检时间")
    private Date checkTime;

    /**
     * 成本金额
     */
    @TableField(value = "cost_amount")
    @Schema(description="成本金额")
    private BigDecimal costAmount;

    /**
     * 销售单价
     */
    @TableField(value = "unit_price")
    @Schema(description="销售单价")
    private BigDecimal unitPrice;

    /**
     * 销售总金额
     */
    @TableField(value = "unit_amount")
    @Schema(description="销售总金额")
    private BigDecimal unitAmount;

    /**
     * 质量状态(0=待检,1=合格,2=不合格)
     */
    @TableField(value = "quality_status")
    @Schema(description="质量状态(0=待检,1=合格,2=不合格)")
    private Integer qualityStatus;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time")
    @Schema(description="创建时间")
    private Date createTime;
}